import bus from '@/bus'
let data = {
  status: 'pass',
  totalItem: 1,
  pageSize: window.$pageSize,
  currentPage: 1,
  departments: [],
  distributors: [],
  prizes: [],
  storeTypes: [],
  form: {
    storeId: null,
    officeId: {},
    departmentId: null,
    distributorId: [],
    receiverInfo: '',
    prizeId: null,
    giftType: 0,
    storeType: null
  },
  columns: [{
    title: '订单ID',
    key: 'orderId',
    align: 'left',
    minWidth: 200
  }, {
    title: '门店ID',
    key: 'storeId',
    align: 'left',
    minWidth: 150
  }, {
    title: '门店名称',
    key: 'storeName',
    align: 'left',
    minWidth: 150
  }, {
    title: '门店联系人',
    key: 'storeContactName',
    align: 'left',
    minWidth: 120
  }, {
    title: '门店类型',
    key: 'storeTypeName',
    align: 'left',
    minWidth: 120
  }, {
    title: '门店登录手机',
    key: 'storePhone',
    align: 'left',
    minWidth: 150
  }, {
    title: '兑换前',
    key: 'exchangeBeforeScore',
    align: 'left',
    minWidth: 100
  }, {
    title: '兑换后',
    key: 'exchangeEndScore',
    align: 'left',
    minWidth: 100
  }, {
    title: '上级经销商',
    key: 'distributorName',
    align: 'left',
    minWidth: 150
  }, {
    title: '部门（地区）',
    key: 'departmentName',
    align: 'left',
    minWidth: 150
  }, {
    title: '科室',
    key: 'officeName',
    align: 'left',
    minWidth: 150
  }, {
    title: '兑换礼品',
    key: 'giftNames',
    align: 'left',
    minWidth: 160
  }, {
    title: '收货地址',
    key: 'receiverAddress',
    align: 'left',
    minWidth: 220,
    tooltip: true
  }, {
    title: '备注',
    key: 'remark',
    align: 'left',
    minWidth: 150,
    tooltip: true
  }, {
    title: '快递单号',
    key: 'trackingNumber',
    align: 'left',
    minWidth: 150,
    render: (h, param) => {
      let list = []
      let arr = param.row.trackingNumber ? param.row.trackingNumber.split(',') : []
      arr.forEach(item => {
        let target = h('p', {
          class: 'font-blue mr cursor',
          on: {
            click: () => {
              bus.$emit('onCheckTrack', item)
            }
          }
        }, item)
        list.push(target)
      })
      return h('div', list)
    }
  }, {
    title: '操作',
    align: 'right',
    minWidth: 150,
    render: (h, param) => {
      return h('Button', {
        props: {
          size: 'small',
          type: 'primary'
        },
        on: {
          click: () => {
            bus.$emit('onCheck', param.row.storeId)
          }
        }
      }, '门店数据')
    }
  }],
  data: []
}
export default data
